Called when user changes an editable records but it restores to its original value.

<div class="definition">
    onRestore = function(event)
</div>

You can add event listener during the object creation:

<textarea class="javascript">
let grid = new w2grid({
    name : 'grid',
    show : {
        toolbar    : true,
        toolbarAdd : true
    },
    columns: [
        { field: 'recid', text: 'ID', size: '50px' },
        { field: 'lname', text: 'Last Name', size: '30%', editable: { type: 'text' } },
        { field: 'fname', text: 'First Name', size: '30%', editable: { type: 'text' } },
        { field: 'email', text: 'Email', size: '40%', editable: { type: 'email' } },
        { field: 'sdate', text: 'End Date', size: '120px', editable: { type: 'date' } }
    ],
    records: [
        { recid: 1, fname: 'John', lname: 'doe', email: 'vitali@gmail.com', sdate: '1/3/2012' },
        { recid: 2, fname: 'Stuart', lname: 'Motzart', email: 'jdoe@gmail.com', sdate: '2/4/2012' },
        { recid: 3, fname: 'Jin', lname: 'Franson', email: '--', sdate: '4/23/2012' },
        { recid: 4, fname: 'Susan', lname: 'Ottie', email: 'jdoe@gmail.com', sdate: '5/3/2012' },
        { recid: 5, fname: 'Kelly', lname: 'Silver', email: 'jdoe@gmail.com', sdate: '4/3/2012' },
        { recid: 6, fname: 'Francis', lname: 'Gatos', email: 'vitali@gmail.com', sdate: '2/5/2012' }
    ],
    onRestore: function(event) {
        console.log(event);
    }
});
</textarea>

or after the object has been created:

<textarea class="javascript">
w2ui.grid.on('restore', function(event) {
    console.log(event);
});
</textarea>

The record will restore to its original value if user clicks ESC button.
<div style="height: 10px"></div>

The event handler is called before the default action of the event is triggered. You can cancel the default action by calling
<span class="method">event.preventDefault()</span>. To perform an action
after the event is fully processed, define <span class="method">event.onComplete</span> function.
<div style="height: 10px;"></div>
See <a href="utils/events">events</a> page in utilities for more details.